﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace HobSoft.SoccerBet2014.Domain.Models
{
    using Core;
    [Serializable]
    [DataContract]
    public class BetTick : IModel
    {
        private byte _bmId;
        [Required]
        [DataMember(IsRequired = true)]
        [Key]
        public byte BmID
        {
            get { return _bmId; }
            set { _bmId = value; }
        }

        private string _gameId;
        [Required]
        [DataMember(IsRequired = true)]
        [MaxLength(50)]
        [MinLength(2)]
        public string GameID
        {
            get { return _gameId; }
            set { _gameId = value; }
        }

        private string _oddsId;
        [Key]
        [Required]
        [DataMember(IsRequired = true)]
        [MaxLength(50)]
        [MinLength(1)]
        public string OddsID
        {
            get { return _oddsId; }
            set { _oddsId = value; }
        }

        private string _homeTeam;
        [Required]
        [DataMember(IsRequired = true)]
        [MaxLength(50)]
        [MinLength(1)]
        public string HomeTeam
        {
            get { return _homeTeam; }
            set { _homeTeam = value; }
        }

        private string _awayTeam;
        [Required]
        [DataMember(IsRequired = true)]
        [MaxLength(50)]
        [MinLength(1)]
        public string AwayTeam
        {
            get { return _awayTeam; }
            set { _awayTeam = value; }
        }

        private byte _homeScore;
        [DataMember]
        public byte HomeScore
        {
            get { return _homeScore; }
            set { _homeScore = value; }
        }

        private byte _awayScore;
        [DataMember]
        public byte AwayScore
        {
            get { return _awayScore; }
            set { _awayScore = value; }
        }

        private decimal _handicap;
        [Required]
        [DataMember(IsRequired = true)]
        public decimal Handicap
        {
            get { return _handicap; }
            set { _handicap = value; }
        }

        private decimal _price;
        [Required]
        [DataMember(IsRequired = true)]
        public decimal Price
        {
            get { return _price; }
            set { _price = value; }
        }

        private OddsPrice.OddsPriceType priceType;
        [Key]
        [Required]
        [DataMember(IsRequired = true)]
        public OddsPrice.OddsPriceType PriceType
        {
            get { return priceType; }
            set { priceType = value; }
        }

        private Odds.MarketType _marketType;
        [Required]
        [DataMember(IsRequired = true)]
        public Odds.MarketType MarketType
        {
            get { return _marketType; }
            set { _marketType = value; }
        }


        private decimal _maxAmount;
        [Required]
        [DataMember(IsRequired = true)]
        public decimal MaxAmount
        {
            get { return _maxAmount; }
            set { _maxAmount = value; }
        }

        private decimal _minAmount;
        [Required]
        [DataMember(IsRequired = true)]
        public decimal MinAmount
        {
            get { return _minAmount; }
            set { _minAmount = value; }
        }

        private int _betCount;
        [DataMember]
        public int BetCount
        {
            get { return _betCount; }
            set { _betCount = value; }
        }

        private string _updateAccount;
        [DataMember]
        public string UpdateAccount
        {
            get { return _updateAccount; }
            set { _updateAccount = value; }
        }

        private string _updateHost;
        [DataMember]
        public string UpdateHost
        {
            get { return _updateHost; }
            set { _updateHost = value; }
        }
        

    }
}
